#pragma once

#include "resource.h"       

class CMain : public CWinAppEx
{
public:
	CMain();

	virtual BOOL InitInstance();
	virtual int ExitInstance();

	virtual void PreLoadState();
	virtual void LoadCustomState();
	virtual void SaveCustomState();

	BOOL  m_bHiColorIcons;

protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnFileNew();

private:
	bool LoadApplication();
	void OnDocumentOpening(IObject* sender,const String& docname);
	void OnDocumentOpened(IObject* sender,const String& docname);
	void OnDocumentCreated(IObject* sender,const String& docname);
	sys::ObjectPtr m_objWorkspace;
};

extern CMain theApp;
